import { createRouter, createWebHashHistory } from 'vue-router';
import Login from '../pages/Login';
import Admin from '../pages/Admin';

import Home from '../components/Content/Home';
import Classes from '../components/Content/Classes';
import Product from '../components/Content/Product';

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        { path: '/login', component: Login },
        {
            path: '/admin', component: Admin,
            children: [
                { path: 'home', component: Home },
                { path: 'classes', component: Classes },
                { path: 'product', component: Product },
                { path: '', redirect: '/admin/home' }
            ]
        },
        { path: '/', redirect: '/login' }
    ]
});

export default router;